package com.gph.saviorframework.os.authz.dao;

import com.gph.saviorframework.os.model.oauth.OauthCode;
import org.apache.ibatis.annotations.Param;
import org.aspectj.lang.annotation.Aspect;

@Aspect
public interface OauthCodeDao {

    void saveOauthCode(OauthCode oauthCode);

    OauthCode findOauthCode(@Param("code") String code,
                            @Param("clientId") String clientId);

    OauthCode findOauthCodeByUsernameClientId(@Param("username") String username,
                                              @Param("clientId") String clientId);

    int deleteOauthCode(OauthCode oauthCode);
}
